package cn.org.farseer.sweetftp.rcp.listener;

import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.DragSourceListener;

import cn.org.farseer.sweetftp.rcp.ui.FileBrowser;
 
/**
 * 作者 : [Farseer.org] 简洋  —  2009-7-24
 * 
 * 项目 : [Farseer.org] SweetFTP
 */
public class FileDragListener implements DragSourceListener
{

	private FileBrowser fileBrowser;
	public FileDragListener(FileBrowser fileBrowser)
	{
		this.fileBrowser = fileBrowser;
	}

	public void dragFinished(DragSourceEvent event)
	{
		System.out.println("dragFinished");
	}

	public void dragSetData(DragSourceEvent event)
	{
		System.out.println("dragSetData");
		event.data = fileBrowser.getSelectedFiles();
	}

	public void dragStart(DragSourceEvent event)
	{
		System.out.println("dragStart");
		event.doit = true;
	}

}
